<template>
	<view class="box" :style="{'padding-top':systemHeight+26.5+'px'}">
		<view>
			<view class="head">
				<image class="back" src="/static/img/back.png" @click="back()"></image>
				<view class="title">Add Address</view>
				<view class="right"></view>
			</view>

			<view class="small_title"><text class="xx">*</text>Address Name</view>
			<input class="input" placeholder="Home" />
			<view class="small_title"><text class="xx">*</text>Address Name</view>
			<view class="postion" @click="addAddress()">
				<view class="postion_text">.Pantai Cemongkak No.9, Pecatu, Kuta Saasdasdasdasd</view>
				<image class="select_postion" src="/static/img/right.png" ></image>
			</view>
		</view>
		<view class="save" @click="save()">Save</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				systemHeight: null
			}
		},
		created() {
			this.systemHeight = uni.getSystemInfoSync().statusBarHeight
		},
		methods: {
			//保存按钮
			save(){
				
			},
			back(){
				uni.navigateBack()
			},
			addAddress(){
				uni.navigateTo({
					url:"/pages/index/addAddress"
				})
			}
		}
	}
</script>

<style>
	.box {
		position: fixed;
		width: 100%;
		height: 100vh;
	}

	.head {
		display: flex;
		justify-content: space-between;
		align-items: center;
		width: 92%;
		margin: 0rpx auto 76rpx;
	}

	.back {
		width: 20rpx;
		height: 36rpx;
	}

	.title {
		font-family: Mont;
		font-weight: bold;
		font-size: 32rpx;
	}

	.right {
		width: 20rpx;
	}

	.small_title {
		width: 92%;
		margin: 0rpx auto;
		font-family: Mont;
		font-weight: 500;
		font-size: 28rpx;
		margin-bottom: 41rpx;
	}

	.xx {
		color: #34BA78;
	}

	.input {
		width: 92%;
		margin: 0rpx auto 79rpx;
		white-space: pre-wrap;
		word-wrap: break-word;
	}

	.postion {
		display: flex;
		align-items: center;
		width: 92%;
		margin: 0rpx auto;
		
		overflow: hidden;
		white-space: nowrap;
		text-overflow: ellipsis;
		-o-text-overflow: ellipsis;
	}
	.postion_text{
		width: 100%;
		overflow: hidden;
		white-space: nowrap;
		text-overflow: ellipsis;
		-o-text-overflow: ellipsis;
	}
	.select_postion{
		width: 11rpx;
		height: 20rpx;
	}
	.right{
		width: 11rpx;
		height: 20rpx;
		margin-left: 26rpx;
	}
	.save{
		position: absolute;
		bottom: 185rpx;
		left: 50%;
		transform: translate(-50%,0);
		width: 92%;
		height: 92rpx;
		background: #34BA78;
		border-radius: 46rpx;
		

		font-family: Mont;
		font-weight: bold;
		font-size: 30rpx;
		color: #FFFFFF;
		line-height: 92rpx;
		text-align: center;
	}
</style>